home *** CD-ROM | disk | FTP | other *** search
- Path: news.th-darmstadt.de!news
- From: Enno Sandner <enno@intellektik.informatik.th-darmstadt.de>
- Newsgroups: comp.lang.c++
- Subject: Re: delete
- Date: Wed, 07 Feb 1996 09:11:39 +0100
- Organization: Fachbereich Informatik, TH Darmstadt
- Message-ID: <31185EBB.41C67EA6@intellektik.informatik.th-darmstadt.de>
- References: <DMDBqB.Bw5@undergrad.math.uwaterloo.ca>
- NNTP-Posting-Host: kitz.intellektik.informatik.th-darmstadt.de
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b6a (X11; I; SunOS 4.1.3 sun4m)
-
- Steve Kettle wrote:
- >
- > The delete operator can be overloaded in a class by overloading with
- > declaration
- > void operator delete(void*);
- >
- > There is no way I see to set a pointer being deleted to 0 because of the
- > pass by value.
- >
- > Is there anyway to force a deleted pointer to be zero or are we just
- > at mercy of the compiler implementation?
- > --
-
- I don't know of any compiler that zeros the pointer-value when the
- underlying object is deleted. Anyway unless you get completly rid of
- ordinary pointers and replace them by wrappers there is no reasonable
- way to mark an object as deleted. The remaining problem will always be
- objects that are referred by more then one pointer.
-
- Enno
-